import { http } from '@/utils/http'
type Notice = {
  id: string
  title: string
  content: string
  createTime: string
}
const id = uni.getStorageSync('userInfo').id

export function getNoticeList() {
  return http<Notice[]>({
    url: `/get/api/v1/develop/message?user_id=c61a8166-6a49-42ba-8173-39babe2c8d8f`,
    method: 'GET',
    header: {
      'Content-Type': 'application/json',
      'Cache-Control': 'no-cache',
    },
  })
}

export function setNoticeList(id: string) {
  console.log(id)

  return http<Notice>({
    url: `/get/api/v1/develop/message?id=${id}`,
    method: 'PUT',
  })
}
